home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / OEMNADD2.IN_ / oemnadd2.inf
INI File  |  1996-07-12  |  32KB  |  830 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     ISA
  5.     EISA
  6.     "Jazz-Internal Bus"
  7. [Options]
  8.     DECETHERWORKSTURBO
  9. [FileConstants]
  10. UtilityInf      = "UTILITY.INF"
  11. ParamInf        = "NCPARAM.INF"
  12. subroutineinf   = "SUBROUTN.INF"
  13. SoftwareType    = "driver"
  14. Exit_Code       = 0
  15. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  16. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  17. Manufacturer    = "Microsoft"
  18. ProductMajorVersion     = "4"
  19. ProductMinorVersion     = "0"
  20. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  21. ProductSoftwareName     = "Lance"
  22. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\lance.sys"
  23. NetRuleSoftwareType     = "lanceSys ndisDriver lanceDriver"
  24. NetRuleSoftwareUse      = $(SoftwareType)
  25. NetRuleSoftwareBindForm = """LanceSys"" yes no container"
  26. NetRuleSoftwareClass    = {"lanceDriver basic"}
  27. ProductHardwareName     = "Lance"
  28. NetRuleHardwareType     = "decetherworksturbo decetherworksturboAdapter"
  29. NetRuleHardwareBindForm = " yes yes container"
  30. NetRuleHardwareClass    = {"decetherworksturboAdapter basic"}
  31. ProductOpSupport     = 134 
  32. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  33. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  34. [GeneralConstants]
  35. from      = ""
  36. to        = ""
  37. ExitCodeOk     = 0
  38. ExitCodeCancel = 1
  39. ExitCodeFatal  = 2
  40. KeyNull         = ""
  41. MAXIMUM_ALLOWED   = 33554432
  42. RegistryErrorIndex = NO_ERROR
  43. KeyProduct      = ""
  44. KeyParameters   = ""
  45. TRUE            = 1
  46. FALSE           = 0
  47. NoTitle            = 0
  48. ExitState   = "Active"
  49. OldVersionExisted = $(FALSE)
  50. DriverPath      = $(!STF_NTPATH)\drivers
  51. [date]
  52.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  53. [Identify]
  54.     read-syms Identification
  55.     set Status     = STATUS_SUCCESSFUL
  56.     set Identifier = $(OptionType)
  57.     set Media      = #("Source Media Descriptions", 1, 1)
  58.     Return $(Status) $(Identifier) $(Media)
  59. [ReturnOptions]
  60.     set Status        = STATUS_FAILED
  61.     set OptionList     = {}
  62.     set OptionTextList = {}
  63.     set LanguageList = ^(LanguagesSupported, 1)
  64.     Ifcontains(i) $($0) in $(LanguageList)
  65.         ifstr(i) $($1) == ""
  66.            goto returnoptions
  67.         endif
  68.         set PlatformList = ^(PlatformsSupported, 1)
  69.         Ifcontains(i) $($1) in $(PlatformList)
  70.            goto returnoptions
  71.         else
  72.            set Status = STATUS_NOTSUPPORTED
  73.            goto finish_ReturnOptions
  74.         endif
  75.     else
  76.         set Status = STATUS_NOLANGUAGE
  77.         goto finish_ReturnOptions
  78.     endif
  79. returnoptions = +
  80.     set OptionList     = ^(Options, 1)
  81.     set OptionTextList = ^(OptionsText$($0), 1)
  82.     set Status         = STATUS_SUCCESSFUL
  83. finish_ReturnOptions = +
  84.     Return $(Status) $(OptionList) $(OptionTextList)
  85. [InstallOption]
  86.     set Option   = $($1)
  87.     set SrcDir   = $($2)
  88.     set AddCopy  = $($3)
  89.     set DoCopy   = $($4)
  90.     set DoConfig = $($5)
  91.     set LanguageList = ^(LanguagesSupported, 1)
  92.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  93.         Return STATUS_NOLANGUAGE
  94.     endif
  95.     set-subst LF = "\n"
  96.     read-syms GeneralConstants
  97.     read-syms FileConstants
  98.     Shell $(UtilityInf), GetBindingInfo, "DEC"
  99.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  100.         Debug-Output "ShellCode error: cannot get an error string."
  101.         goto ShellCodeError
  102.     endif
  103.     set NetRuleSoftwareBindable = $($R1)
  104.     read-syms DialogConstants$(!STF_LANGUAGE)
  105.     ifstr(i) $(!NTN_Origination) == "NCPA"
  106.         set Continue = $(OK)
  107.     endif
  108.     read-syms FileConstants$(!STF_LANGUAGE)
  109.     detect date
  110.     set-title  $(FunctionTitle)
  111.     set to   = Begin
  112.     set from = Begin
  113.     set CommonStatus = STATUS_SUCCESSFUL
  114.     EndWait
  115. Begin = +
  116.     Set ActivateDetection = FALSE
  117.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  118.         set StartLabel = removeadapter
  119.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  120.         set StartLabel = UpgradeSoftware
  121.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  122.         set StartLabel = bindingadapter
  123.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  124.         set CommonStatus = STATUS_REBOOT
  125.         Set ActivateDetection = TRUE
  126.         set StartLabel = configureadapter
  127.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  128.             Debug-Output "Cannot configure the DEC driver software."
  129.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  130.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  131.                 Debug-Output "ShellCode error: cannot get an error string."
  132.                 goto ShellCodeError
  133.             endif
  134.             set Error = $($R0)
  135.             set from = end
  136.             set to = end
  137.             goto nonfatalinfo
  138.         endif
  139.     else
  140.         set StartLabel = installadapter
  141.         set OEM_ABANDON_OPTIONS = {}
  142.         set OEM_ABANDON_SOFTWARE = FALSE
  143.         set OEM_ABANDON_ON = TRUE
  144.         Set ActivateDetection = TRUE
  145.     endif
  146.     Debug-Output "OEMNADD2.INF: =================================================="
  147.     Debug-Output "OEMNADD2.INF: STF_CWDIR is: "$(!STF_CWDIR)
  148.     Debug-Output "OEMNADD2.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  149.     Debug-Output "OEMNADD2.INF: Option is: "$(Option)
  150.     Debug-Output "OEMNADD2.INF: !STF_NCDETECT  is: "$(!STF_NCDETECT)
  151.     Debug-Output "OEMNADD2.INF: !STF_NCOPTION  is: "$(!STF_NCOPTION)
  152.     Debug-Output "OEMNADD2.INF: !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  153.     Debug-Output "OEMNADD2.INF: !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  154.     Debug-Output "OEMNADD2.INF: =================================================="
  155.     Set DetectedCard = FALSE
  156.     Ifstr(i) $(ActivateDetection) != TRUE
  157.         Goto skipdetection
  158.     Endif
  159.     Set TypeList = {{IRQ,IRQ_List,IRQLevel},+
  160.                     {IOADDR, IOADDR_Addr_List, IOBaseAddress},+
  161.                     {MEMADDR, MemBaseAddrDecList MemBaseAddrDec},+
  162.                     {MEMADDRLENGTH, MemLengthList, NONE}}
  163.     Debug-Output "OEMNADD2.INF: Calling Param_BuildTypeLists"
  164.     Shell $(ParamInf) Param_BuildTypeLists $(Option) $(TypeList)
  165.     Set Status = $($R0)
  166.     ifstr(i) $(Status) != STATUS_SUCCESSFUL
  167.         Goto fataldetect
  168.     Endif
  169.     Debug-Output "OEMNADD2.INF: Calling Param_SetDefaults"
  170.     Shell $(ParamInf) Param_SetDefaults {}
  171.     Set IOADDR_Base_List = {1,2}
  172.     Shell $(ParamInf) HexListFromDecList $(MemBaseAddrDecList)
  173.     Set MemBaseAddrHexList = $($R0)
  174.     Ifstr(i) $(!STF_NCDETECT) == YES
  175.         Ifstr(i) $(!STF_NCOPTION) == $(Option)
  176.            Set DetectedCard = TRUE
  177.            Debug-Output "OEMNADD2.INF: Setting DetectedCard to TRUE"
  178.         Endif
  179.     Endif
  180. skipdetection =+
  181.     set from = $(fatal)
  182.     set to = $(fatal)
  183.     goto $(StartLabel)
  184. installadapter = +
  185.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  186.     Ifstr $(KeyProduct) != $(KeyNull)
  187.         CloseRegKey $(KeyProduct)
  188.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  189.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  190.                $(ProductVersion)
  191.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  192.                Debug-Output "ShellCode error: cannot get an error string."
  193.                goto ShellCodeError
  194.            endif
  195.            goto end
  196.         else
  197.            Shell $(UtilityInf), CardExistedDlg
  198.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  199.                Debug-Output "ShellCode error: cannot get an error string."
  200.                goto ShellCodeError
  201.            endif
  202.            ifstr(i) $($R1) != "OK"
  203.                set CommonStatus = STATUS_USERCANCEL
  204.                goto end
  205.            endif
  206.            set OldVersionExisted = $(TRUE)
  207.         endif
  208.     endif
  209.     Ifstr(i) $(DetectedCard) != TRUE
  210.         Goto adaptersetup
  211.     Endif
  212.     StartWait
  213.     Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  214.     EndWait
  215.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  216.         Goto adaptersetup
  217.     Endif
  218.     Set DetectedParams = $($R1)
  219.     Debug-Output "OEMNADD2.INF: Calling Param_SetDefaults to merge detected params"
  220.     Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  221.     Goto adaptersetup
  222. configureadapter = +
  223.     Ifstr $(KeyProduct) == $(KeyNull)
  224.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  225.         Ifstr $(KeyProduct) == $(KeyNull)
  226.             set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  227.             Debug-Output "Cannot find component product key"
  228.             goto fatalregistry
  229.         Endif
  230.     Endif
  231.     Debug-Output "INF: Shelling to FindService"
  232.     Shell $(UtilityInf) FindService, $(KeyProduct)
  233.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  234.         Debug-Output "INF: FindService shell failure"
  235.         Goto ShellCodeError
  236.     Endif
  237.     Ifstr(i) $($R0) != NO_ERROR
  238.         Debug-Output "INF: FindService Shell error: "$($R0)
  239.         Goto fatalregistry
  240.     endif
  241.     set KeyParameters = $($R2)
  242.     CloseRegKey $($R1)
  243.     Ifstr $(KeyParameters) == $(KeyNull)
  244.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  245.         Debug-Output "Cannot find component service"
  246.         goto fatalregistry
  247.     endif
  248.     set OldVersionExisted = $(TRUE )
  249.     set ValueName = ""
  250.     set ValueData = ""
  251.     set ValueStr  = ""
  252.     set ValueList = {}
  253.     Set IOBaseChoice = 1
  254.     EnumRegValue $(KeyParameters) ValueList
  255.     ForListDo $(ValueList)
  256.         set ValueItem = $($)
  257.         set ValueName = *($(ValueItem),1)
  258.         set ValueData = *($(ValueItem),4)
  259.         Ifstr(i) $(ValueName) == "InterruptNumber"
  260.             set IRQLevel = $(ValueData)
  261.         else-Ifstr(i) $(ValueName) == "IOBaseAddress"
  262.             set IOBaseChoice = $(ValueData)
  263.         else-Ifstr(i) $(ValueName) == "MemoryMappedBaseAddress"
  264.             set MemBaseAddrDec = $(ValueData)
  265.         else-ifstr(i) $(ValueName) == "BusType"
  266.             set BusInterfaceType = $(ValueData)
  267.         else-ifstr(i) $(ValueName) == "BusNumber"
  268.             set BusNumber = $(ValueData)
  269.         endif
  270.     EndForListDo
  271.     ifint $(IOBaseChoice) == 768
  272.         set IOBaseChoice = 1
  273.     else-ifint $(IOBaseChoice) == 512
  274.         set IOBaseChoice = 2
  275.     endif
  276.     Set Iox = ~($(IOADDR_Base_List),$(IOBaseChoice))
  277.     Ifint $(Iox) == 0
  278.         Set Iox = 1  
  279.     Endif
  280.     Set IOBaseAddress = *($(IOADDR_Addr_List),$(Iox))
  281.     Debug-Output "OEMNADD2.INF: setting IOBaseAddress to: "$(IOBaseAddress)
  282. adaptersetup =+
  283.     Set IOBaseChoice = *($(IOADDR_Base_List),~($(IOADDR_Addr_List),$(IOBaseAddress)))
  284.     Debug-Output "OEMNADD2.INF: setting IOBaseChoice to: "$(IOBaseChoice)
  285.     Set MemBaseAddrHex = *($(MemBaseAddrHexList), ~($(MemBaseAddrDecList),+
  286.                             $(MemBaseAddrDec)))
  287.     Shell $(ParamInf) Param_ParameterConfidence
  288.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  289.         Debug-Output "OEMNADE2.INF: parameter confidence too low to bypass configuration"
  290.         Goto adapteroptions
  291.     Endif
  292.     Ifstr(i) $(DetectedCard) == TRUE
  293.         Ifstr(i) $(!STF_INSTALL_MODE) != CUSTOM
  294.             set BusInterfaceType = *($(!STF_NCDETINFO),5)
  295.             set BusNumber = *($(!STF_NCDETINFO),6)
  296.             Goto adapterverify
  297.         Endif
  298.     Endif
  299. adapteroptions = +
  300.     set from = adapteroptions
  301.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  302.         ifstr(i) $(!AutoNetInterfaceType) != ""
  303.             set BusInterfaceType = $(!AutoNetInterfaceType)
  304.         else
  305.             set BusInterfaceType = 1    
  306.         endif
  307.         ifstr(i) $(!AutoNetBusNumber) != ""
  308.             set BusNumber = $(!AutoNetBusNumber)
  309.         else
  310.             set BusNumber = 0
  311.         endif
  312.         goto adapterverify
  313.     endif
  314.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  315.     ui start "InputDlg"
  316.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  317.         set IRQLevel = $(Combo1Out)
  318.         set MemBaseAddrHex = $(Combo2Out)
  319.         set IOBaseChoice = *($(RadioOut),1)
  320.         ui pop 1
  321.     else-ifstr(i) $(DLGEVENT) == "BACK"
  322.         set CommonStatus = STATUS_USERCANCEL
  323.         Debug-Output "OEMNADD2.INF: Action: exit. Bye."
  324.         ui pop 1
  325.         goto end
  326.     else
  327.         ui pop 1
  328.         Debug-Output "OEMNADD2.INF: Action: unknown. Bye."
  329.         goto end
  330.     endif
  331.     Set IOBaseAddress = *($(IOADDR_Addr_List),~($(IOADDR_Base_List),$(IOBaseChoice)))
  332.     Debug-Output "OEMNADD2.INF: setting IOBaseAddress to: "$(IOBaseAddress)
  333.     Set MemBaseAddrDec = *($(MemBaseAddrDecList), ~($(MemBaseAddrHexList),+
  334.                             $(MemBaseAddrHex)))
  335.     Debug-Output "OEMNADD2.INF: setting mem base addr to: "$(MemBaseAddrDec)
  336.     ifstr(i) $(!STF_NCDETINFO) == {}
  337.         Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardwareDescription) $(BusInterfaceType) $(BusNumber)
  338.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  339.             Debug-Output "ShellCode error."
  340.             goto ShellCodeError
  341.         endif
  342.         set BusInterfaceType = $($R1)
  343.         set BusNumber = $($R2)
  344.     else
  345.         set BusInterfaceType = *($(!STF_NCDETINFO),5)
  346.         set BusNumber = *($(!STF_NCDETINFO),6)
  347.     endif
  348. adapterverify =+
  349.     Ifstr(i) $(DetectedCard) != TRUE
  350.         Goto skipoptions
  351.     Endif
  352.     Debug-Output "OEMNADD2.INF: Calling Param_VerifyCard"
  353.     Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  354.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  355.         Debug-Output "OEMNADD2.INF: Param_VerifyCard succeeded"
  356.         Goto skipoptions
  357.     Endif
  358.     Set from = adapteroptions
  359.     Set to = skipoptions
  360.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  361.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  362.         Debug-Output "ShellCode error: cannot get an error string."
  363.         goto ShellCodeError
  364.     endif
  365.     set Error = $($R0)
  366.     Goto Warning
  367. skipoptions =+
  368.     ifint $(OldVersionExisted) == $(TRUE)
  369.         ifstr(i) $(!NTN_InstallMode) == configure
  370.             goto writeparameters
  371.         endif
  372.     endif
  373.     StartWait
  374.     Ifint $(OldVersionExisted) != $(FALSE)
  375.         Goto installhardware
  376.     Endif
  377.     ifstr(i) $(!NTN_InstallMode) == "install"
  378.        Ifstr(i) $(DoCopy) == "YES"
  379.           Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  380.           Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  381.               Goto ShellCodeError
  382.           Else-Ifstr(i) $($R0) == STATUS_FAILED
  383.               Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  384.               ifint $($ShellCode) != $(!SHELL_CODE_OK)
  385.                   goto ShellCodeError
  386.               endif
  387.               set Error = $($R0)
  388.               Goto fatal
  389.           Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  390.               Goto successful
  391.           Endif
  392.           Set SrcDir = $($R1)
  393.        Endif
  394.        install "Install-Option"
  395.        ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  396.            Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  397.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  398.                goto ShellCodeError
  399.            endif
  400.            set Error = $($R0)
  401.            goto fatal
  402.        endif
  403.     endif
  404.     Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  405.         $(ProductSoftwareName), +
  406.         $(ProductSoftwareName), +
  407.         $(ProductSoftwareName), $(STF_CONTEXTINFNAME), +
  408.         $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  409.         $(NetEventDLL)
  410.     Set OEM_ABANDON_SOFTWARE = TRUE
  411.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  412.             Debug-Output "ShellCode error"
  413.             goto ShellCodeError
  414.     endif
  415.     set RegistryErrorIndex = $($R0)
  416.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  417.             EndWait
  418.             Debug-Output "Registry error: add software components"
  419.             CloseRegKey $($R1)
  420.             CloseRegKey $($R2)
  421.             CloseRegKey $($R3)
  422.             CloseRegKey $($R4)
  423.         CloseRegKey $($R5)
  424.         goto fatalregistry
  425.     endif
  426.     set SoftProductKey   = $($R1)
  427.     Set SoftNetRuleKey   = $($R2)
  428.     Set SoftServiceKey   = $($R3)
  429.     Set SoftParameterKey = $($R4)
  430.     Set SoftLinkageKey   = $($R5)
  431.     set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  432.                        {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  433.                        {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  434.                        {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  435.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  436.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  437.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  438.     Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  439.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  440.             Debug-Output "ShellCode error."
  441.             goto ShellCodeError
  442.     endif
  443.     set RegistryErrorIndex = $($R0)
  444.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  445.             EndWait
  446.             Debug-Output "Resgitry error: add value list."
  447.             CloseRegKey $(SoftProductKey)
  448.             CloseRegKey $(SoftNetRuleKey)
  449.             CloseRegKey $(SoftServiceKey)
  450.             CloseRegKey $(SoftParameterKey)
  451.         CloseRegKey $(SoftLinkageKey)
  452.         goto fatalregistry
  453.     endif
  454.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  455.                         {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  456.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  457.                         {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  458.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  459.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  460.     Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  461.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  462.             Debug-Output "ShellCode error."
  463.             goto ShellCodeError
  464.     endif
  465.     set RegistryErrorIndex = $($R0)
  466.     CloseRegKey $(SoftProductKey)
  467.     CloseRegKey $(SoftNetRuleKey)
  468.     CloseRegKey $(SoftServiceKey)
  469.     CloseRegKey $(SoftParameterKey)
  470.     CloseRegKey $(SoftLinkageKey)
  471.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  472.         EndWait
  473.         Debug-Output "Resgitry error: add value list."
  474.         goto fatalregistry
  475.     endif
  476. installhardware =+
  477.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  478.     ifint $($R4) != -1
  479.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  480.     endif
  481.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  482.         Debug-Output "Cannot add hardware component"
  483.         goto ShellCodeError
  484.     endif
  485.     set RegistryErrorIndex = $($R0)
  486.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  487.         EndWait
  488.         Debug-Output "Registry error: add hardware component"
  489.         CloseRegKey $($R1)
  490.         CloseRegKey $($R2)
  491.         CloseRegKey $($R3)
  492.         goto fatalregistry
  493.     endif
  494.     set KeyParameters = $($R3)
  495.     set KeyAdapterRules = $($R2)
  496.     set AdapterNumber = $($R4)
  497.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  498.                        {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+
  499.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescription)},+
  500.                        {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  501.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  502.                        {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)},+
  503.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  504.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  505.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  506.         Debug-Output "ShellCode error"
  507.         goto ShellCodeError
  508.     endif
  509.     CloseRegKey $($R1)
  510.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  511.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  512.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  513.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  514.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  515.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  516.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  517.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  518.         Debug-Output "ShellCode error."
  519.         goto ShellCodeError
  520.     endif
  521.     set RegistryErrorIndex = $($R0)
  522.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  523.         EndWait
  524.         Debug-Output "Resgitry error: add value list."
  525.         CloseRegKey $(KeyParameters)
  526.         CloseRegKey $(KeyAdapterRules)
  527.         goto fatalregistry
  528.     endif
  529.     CloseRegKey $(KeyAdapterRules)
  530.     goto writeparameters
  531. writeparameters = +
  532.     set MemBaseAddrDec = *($(MemBaseAddrDecList), ~($(MemBaseAddrHexList),+
  533.                           $(MemBaseAddrHex)))
  534.     set CardTypeValue = 2
  535.     ifint $(IOBaseChoice) == 2
  536.         set IOBaseChoice = 512
  537.     else
  538.         set IOBaseChoice = 768
  539.     endif
  540.     set NewValueList = {+
  541.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  542.                        {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  543.                        {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  544.                        {CardType,$(NoTitle),$(!REG_VT_DWORD),$(CardTypeValue)},+
  545.                        {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQLevel)},+
  546.                        {IOBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseChoice)},+
  547.                        {MemoryMappedBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(MemBaseAddrDec)}+
  548.                        }
  549.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  550.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  551.         Shell $(UtilityInf),AddDefaultNetCardParameters,$(KeyParameters)
  552.     endif
  553.     CloseRegKey $(KeyParameters)
  554.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  555.         Debug-Output "ShellCode error."
  556.         goto ShellCodeError
  557.     endif
  558.     set RegistryErrorIndex = $($R0)
  559.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  560.         Debug-Output "Registry error: Add value list"
  561.         goto fatalregistry
  562.     endif
  563.     EndWait
  564.     goto successful
  565. bindingadapter =+
  566.     set Error = "Binding: Sorry, not yet implemented."
  567.     goto fatal
  568. removeadapter = +
  569.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  570.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  571.             $(ProductSoftwareName)
  572.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  573.             Debug-Output "ShellCode error"
  574.             goto ShellCodeError
  575.         endif
  576.         set RegistryErrorIndex = $($R0)
  577.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  578.             goto fatalregistry
  579.         endif
  580.     else
  581.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  582.             $(ProductSoftwareName), $(!NTN_RegBase)
  583.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  584.             Debug-Output "ShellCode error"
  585.             goto ShellCodeError
  586.         endif
  587.         set RegistryErrorIndex = $($R0)
  588.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  589.             goto fatalregistry
  590.         endif
  591.     endif
  592.     goto end
  593. UpgradeSoftware = +
  594.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  595.     Ifstr $(KeyProduct) != $(KeyNull)
  596.         install "Install-Update"
  597.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  598.             goto fatal
  599.         endif
  600.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  601.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  602.         CloseRegKey $(KeyProduct)
  603.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Linkage" $(MAXIMUM_ALLOWED) LinkageKey
  604.         ifstr(i) $(LinkageKey) != ""
  605.             GetRegValue $(LinkageKey) Bind BindInfo
  606.             ForListDo *($(BindInfo),4)
  607.                 Split-String $($) "\" CardInfo
  608.                 QueryListSize CardPos $(CardInfo)
  609.                 OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"*($(CardInfo),$(CardPos))"\Parameters" $(MAXIMUM_ALLOWED) ParamKey
  610.                 ifstr $(ParamKey) != ""
  611.                     GetRegValue $(ParamKey) "IOBaseAddress" IOInfo
  612.                     ifint *($(IOInfo),4) == "1"
  613.                         SetRegValue $(ParamKey) {IOBaseAddress,$(NoTitle),$(!REG_VT_DWORD),768}
  614.                     else-ifint *($(IOInfo),4) == "2"
  615.                         SetRegValue $(ParamKey) {IOBaseAddress,$(NoTitle),$(!REG_VT_DWORD),512}
  616.                     endif
  617.                     CloseRegKey $(ParamKey)
  618.                 endif
  619.             EndForListDo
  620.             CloseRegKey $(LinkageKey)
  621.         endif
  622.     else
  623.         goto fatalregistry
  624.     endif
  625.     set iSearch = 1
  626. nextnetcard = +
  627.     Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
  628.     set KeyNetcard = $($R0)
  629.     set iSearch = $($R1)
  630.     Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  631.     Ifstr $(KeyNetcard) != $(KeyNull)
  632.         Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  633.         SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  634.         CloseRegKey $(KeyNetcard)
  635.         goto nextnetcard
  636.     Endif
  637.     goto end
  638. successful = +
  639.     goto end
  640. abandon = +
  641.     ForListDo $(OEM_ABANDON_OPTIONS)
  642.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  643.             $(ProductSoftwareName), $($)
  644.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  645.             Debug-Output "ShellCode error"
  646.             goto ShellCodeError
  647.         endif
  648.         set RegistryErrorIndex = $($R0)
  649.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  650.             goto fatalregistry
  651.         endif
  652.     EndForListDo
  653.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  654.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  655.             $(ProductSoftwareName), FALSE
  656.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  657.             Debug-Output "ShellCode error"
  658.             goto ShellCodeError
  659.         endif
  660.         set RegistryErrorIndex = $($R0)
  661.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  662.             goto fatalregistry
  663.         endif
  664.     endif
  665.     goto end
  666. warning = +
  667.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  668.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  669.         goto ShellCodeError
  670.     endif
  671.     ifstr(i) $($R1) == "OK"
  672.         goto $(to)
  673.     else-ifstr(i) $($R1) == "CANCEL"
  674.         goto $(from)
  675.     else
  676.         goto "end"
  677.     endif
  678. nonfatalinfo = +
  679.     Set CommonStatus = STATUS_USERCANCEL
  680.     Set Severity = STATUS
  681.     goto nonfatalmsg
  682. nonfatal = +
  683.     Set Severity = NONFATAL
  684.     goto nonfatalmsg
  685. nonfatalmsg = +
  686.     ifstr(i) $(Error) == ""
  687.         Set Severity = NONFATAL
  688.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  689.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  690.             goto ShellCodeError
  691.         endif
  692.         set Error = $($R0)
  693.     endif
  694.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  695.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  696.         goto ShellCodeError
  697.     endif
  698.     ifstr(i) $($R1) == "OK"
  699.         goto $(from)
  700.     else
  701.         goto "end"
  702.     endif
  703. fatalregistry = +
  704.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  705.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  706.         goto ShellCodeError
  707.     endif
  708.     set Error = $($R0)
  709.     goto fatal
  710. fataldetect = +
  711.     ifstr(i) $(Error) == ""
  712.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  713.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  714.             goto ShellCodeError
  715.         endif
  716.         set Error = $($R0)
  717.     endif
  718.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  719.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  720.         Debug-Output "ShellCode error: cannot get an error string."
  721.         goto ShellCodeError
  722.     endif
  723.     set Error = $($R0)
  724.     Goto fatal
  725. fatal = +
  726.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  727.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  728.         goto ShellCodeError
  729.     endif
  730.     goto setfailed
  731. ShellCodeError = +
  732.     set DlgType      = "MessageBox"
  733.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  734.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  735.     set STF_MB_TYPE  = 1
  736.     set STF_MB_ICON  = 3
  737.     set STF_MB_DEF   = 1
  738.     ui start "Error Message"
  739.     goto setfailed
  740. setfailed = +
  741.     set CommonStatus = STATUS_FAILED
  742.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  743.         set OEM_ABANDON_ON = FALSE
  744.         goto abandon
  745.     endif
  746.     goto end
  747. end = +
  748.     goto term
  749. term = +
  750.     Return $(CommonStatus)
  751. [Install-Option]
  752.     set STF_VITAL = ""
  753.     ifstr(i) $(AddCopy) == "YES"
  754.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  755.     endif
  756.     ifstr(i) $(DoCopy) == "YES"
  757.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  758.        CopyFilesInCopyList
  759.     endif
  760.     ifstr(i) $(DoConfig) == "YES"
  761.     endif
  762.     Exit
  763. [Install-Update]
  764.    set STF_VITAL        = ""
  765.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  766.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  767.    exit
  768. [Source Media Descriptions]
  769.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  770. [Signature]
  771.     FileType = MICROSOFT_FILE
  772. [GetSignature]
  773.     read-syms Signature
  774.     return $(FileType)
  775. [ProductType]
  776. STF_PRODUCT  = LanmanNT
  777. STF_PLATFORM = I386
  778. [Files-Inf]
  779. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  780. [Files-DECETHERWORKSTURBO]
  781. 1,LANCE.SYS , SIZE=999
  782. [LanguagesSupported]
  783.     ENG
  784. [OptionsTextENG]
  785.     DECETHERWORKSTURBO     = "DEC EtherWORKS Turbo Adapter"
  786. [FileConstantsENG]
  787. ProCaption   = "Windows NT Setup"
  788. ProCancel    = "Cancel"
  789. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  790.                "Are you sure you want to cancel copying files?"
  791. ProCancelCap = "Network Setup Message"
  792. ProText1     = "Copying:"
  793. ProText2     = "To:"
  794. FunctionTitle   = "DEC EtherWORKS Turbo Adapter Card Setup"
  795. ProductSoftwareDescription      = "DEC Lance Adapter Driver"
  796. ProductHardwareDescription      = "DEC EtherWORKS Turbo Adapter"
  797. ProductSoftwareTitle    = "DEC Lance Adapter Driver"
  798. ProductHardwareTitle    = "DEC EtherWORKS Turbo Adapter"
  799. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  800. ShellCodeErrorText      = "Shell Code Error."
  801. [DialogConstantsENG]
  802. Help        = "&Help"
  803. Exit        = "Cancel"
  804. OK          = "OK"
  805. HelpContext = ""
  806. Continue    = "Continue"
  807. Cancel      = "Cancel"
  808. [FileDependentDlgENG]
  809. Label1 = "&IRQ Level:"
  810. Label2 = "&Memory Base Address:"
  811. Group1 = "I/O Port Base Address"
  812. Radio1 = "&Primary"
  813. Radio2 = "&Secondary"
  814. DlgType = "RadioCombination"
  815. DlgTemplate = "DEC_SETUP"
  816. Caption = $(FunctionTitle)
  817. CBOptionGreyed = {}
  818. RadioOptionGreyed = {}
  819. RadioIn = {$(IOBaseChoice)}
  820. Combo1List = $(IRQ_List)
  821. Combo1Out  = $(IRQLevel)
  822. Combo2List = $(MemBaseAddrHexList)
  823. Combo2Out  = $(MemBaseAddrHex)
  824. ComboListItemsIn  = {Combo1List, Combo2List}
  825. ComboListItemsOut = {Combo1Out, Combo2Out}
  826. EditTextIn = ""
  827. EditTextLim = ""
  828. NotifyFields = {NO, NO}
  829. HelpContext = $(!IDH_DB_OEMNADD2_INS)
  830.